package org.giovanolli.mumi.entities;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * The Class PaymentConcept.
 */
@Entity
@Table(name = "payment_concept")
public class PaymentConcept extends IdentificableEntity {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 8658010048188856550L;

	/** The name. */
	@Column(name = "name", unique = true)
	private String name;

	/** The description. */
	@Column(name = "description")
	private String description;

	/** The payment concept type. */
	@Column(name = "payment_concept_type")
	@Enumerated(EnumType.STRING)
	private PaymentConceptType paymentConceptType;

	/** The payment details. */
	@OneToMany(mappedBy = "paymentConcept")
	private List<PaymentDetail> paymentDetails;

	/**
	 * Gets the description.
	 * 
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Gets the name.
	 * 
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Gets the payment concept type.
	 * 
	 * @return the payment concept type
	 */
	public PaymentConceptType getPaymentConceptType() {
		return paymentConceptType;
	}

	/**
	 * Gets the payment details.
	 * 
	 * @return the payment details
	 */
	public List<PaymentDetail> getPaymentDetails() {
		return paymentDetails;
	}

	/**
	 * Sets the description.
	 * 
	 * @param description
	 *            the new description
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * Sets the name.
	 * 
	 * @param name
	 *            the new name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Sets the payment concept type.
	 * 
	 * @param paymentConceptType
	 *            the new payment concept type
	 */
	public void setPaymentConceptType(PaymentConceptType paymentConceptType) {
		this.paymentConceptType = paymentConceptType;
	}

	/**
	 * Sets the payment details.
	 * 
	 * @param paymentDetails
	 *            the new payment details
	 */
	public void setPaymentDetails(List<PaymentDetail> paymentDetails) {
		this.paymentDetails = paymentDetails;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.osoftware.mumi.dao.model.BaseObject#toString()
	 */
	@Override
	public String toString() {
		return "PaymentConcept [name=" + name + ", description=" + description + ", paymentConceptType=" + paymentConceptType + ", toString()=" + super.toString() + "]";
	}

}
